#include <stdio.h>
int main()
{
    int n,t2=0;
    char a[2];
    while (scanf("%d %c %c",&n,&a[0],&a[1])!=EOF)
    {
        if (t2!=0)printf("\n");
        else t2=1;
        if (n==1)printf("%c\n",a[0]);
        else
        {
            if ((n/2+1)%2!=0)
            {
                char temp=a[0];
                a[0]=a[1];
                a[1]=temp;
            }
            int i,j;
            printf(" ");
            for (i=1;i<n-1;i++)printf("%c",a[1]);
            printf(" \n");
            char s[82];
            for (i=0;i<81;i++)s[i]='\0';
            for (i=0;i<n;i++)s[i]=a[1];
            for (i=1;i<=(n-1)/2;i++)
            {
                for (j=i;j<n-i;j++)s[j]=a[(i-1)%2];
                printf("%s\n",s);
            }
            int t=n/2;
            for (i=(n-1)/2+1;i<n-1;i++)
            {
                for (j=t;j<=n-t;j++)s[j]=a[(i-1)%2];
                t--;
                printf("%s\n",s);
            }
            printf(" ");
            for (i=1;i<n-1;i++)printf("%c",a[1]);
            printf(" \n");
        }
    }
    return 0;
}